package com.springboot.jktj.service.impl;

import java.util.List;
import com.springboot.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.springboot.jktj.mapper.JktjReserveMapper;
import com.springboot.jktj.domain.JktjReserve;
import com.springboot.jktj.service.IJktjReserveService;

/**
 * 套餐预约Service业务层处理
 * 
 * @author springboot
 * @date 2023-11-27
 */
@Service
public class JktjReserveServiceImpl implements IJktjReserveService 
{
    @Autowired
    private JktjReserveMapper jktjReserveMapper;

    /**
     * 查询套餐预约
     * 
     * @param id 套餐预约主键
     * @return 套餐预约
     */
    @Override
    public JktjReserve selectJktjReserveById(Long id)
    {
        return jktjReserveMapper.selectJktjReserveById(id);
    }

    /**
     * 查询套餐预约列表
     * 
     * @param jktjReserve 套餐预约
     * @return 套餐预约
     */
    @Override
    public List<JktjReserve> selectJktjReserveList(JktjReserve jktjReserve)
    {
        return jktjReserveMapper.selectJktjReserveList(jktjReserve);
    }

    /**
     * 新增套餐预约
     * 
     * @param jktjReserve 套餐预约
     * @return 结果
     */
    @Override
    public int insertJktjReserve(JktjReserve jktjReserve)
    {
        jktjReserve.setCreateTime(DateUtils.getNowDate());
        return jktjReserveMapper.insertJktjReserve(jktjReserve);
    }

    /**
     * 修改套餐预约
     * 
     * @param jktjReserve 套餐预约
     * @return 结果
     */
    @Override
    public int updateJktjReserve(JktjReserve jktjReserve)
    {
        jktjReserve.setUpdateTime(DateUtils.getNowDate());
        return jktjReserveMapper.updateJktjReserve(jktjReserve);
    }

    /**
     * 批量删除套餐预约
     * 
     * @param ids 需要删除的套餐预约主键
     * @return 结果
     */
    @Override
    public int deleteJktjReserveByIds(Long[] ids)
    {
        return jktjReserveMapper.deleteJktjReserveByIds(ids);
    }

    /**
     * 删除套餐预约信息
     * 
     * @param id 套餐预约主键
     * @return 结果
     */
    @Override
    public int deleteJktjReserveById(Long id)
    {
        return jktjReserveMapper.deleteJktjReserveById(id);
    }
}
